.paycode-page {
  background: #fafafa;
  min-height: 100vh;
  // iOS Safari 兼容性修复
  min-height: calc(100vh - env(safe-area-inset-bottom, 0));
  padding: 0;
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0));

  .paycode-content {
    padding: 16px;
    .member-card {
      border-radius: 8px;
      padding-bottom: 8px;
      .member-header {
        background-image: url(@/assets/images/imageback.png);
        background-size: 100% 100%;
        background-repeat: no-repeat;
        background-position: center;
        padding: 12px 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-radius: 10px;
        height: 65px;
        z-index: 50;
        position: relative;

        .member-info {
          display: flex;
          align-items: center;
          flex-direction: column;
          .member-info-left-top {
            display: flex;
            align-items: center;
            justify-content: start;
            flex-direction: row;
            width: 100%;
          }
          .member-icon {
            font-size: 16px;
            background-image: url(@/assets/images/mem.png);
            background-size: 100% 100%;
            background-repeat: no-repeat;
            background-position: center;
            width: 18px;
            height: 18px;
            padding-right: 4px;
            margin-right: 4px;
          }

          .member-text {
            background: linear-gradient(
              45deg,
              #0e2b55,
              #1e4a8c,
              #3b82f6,
              #60a5fa,
              #93c5fd
            );
            background-size: 400% 400%;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-weight: 600;
            font-size: 16px;
            place-content: 12px;
            animation: rainbow 3s ease-in-out infinite;
          }
        }

        .nearby-merchants {
          display: flex;
          align-items: center;
          justify-content: space-between;
          width: 110px;
          color: #467baf;
          .nearby-merchants-text {
            color: #467baf;
            
          }
          height: 18px;
          font-size: 12px;
          border-radius: 20px;
          padding: 6px 12px;
          height: 32px;
          background-color: #fafcfe;
        }
      }

      .greeting {
        color: #015b8f;
        font-size: 12px;
        padding-top: 4px;
        font-weight: 500;
      }
    }

    // 优惠提示横幅
    .promo-banner {
      background-image: url(@/assets/images/qidai.png);
      background-size: 100% 100%;
      background-repeat: no-repeat;
      background-position: center;
      padding: 12px 16px;
      color: #d46b08;
      font-size: 13px;
      text-align: left;
      box-sizing: border-box;
      height: 44px;
      z-index: 10;
      position: relative;
      top: -8px;
      padding-top: 16px;
    }

    // 数智豆抵扣商户横幅
    .beans-banner {
      background-image: url(@/assets/images/headerTips.png);
      background-size: 100% 100%;
      background-repeat: no-repeat;
      background-position: center;
      border-radius: 12px;
      padding: 16px;
      display: flex;
      align-items: center;
      gap: 12px;
      color: white;
      margin-bottom: 16px;

      .beans-icon {
        width: 72px;
        height: 72px;
        object-fit: contain;
      }

      .beans-content {
        flex: 1;
        padding-top: 20px;
        position: relative;
        img {
          position: absolute;
          top: -10px;
          right: -8px;
        }
        .beans-subtitle {
          display: inline-block;
          width: 105px;
          height: 30px;
          line-height: 20px;
          font-size: 10px;
          position: absolute;
          top: -9px;
          right: 0px;
        }

        .beans-title {
          font-size: 23px;
          line-height: 23px;
          font-weight: bold;
          margin-bottom: 2px;
          color: #fafdc2;
        }

        .beans-desc {
          text-align: center;
          font-size: 14px;
          line-height: 14px;
          opacity: 0.9;
          padding-top: 4px;
        }
      }

      .go-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        img {
          width: 46px;
          height: 46px;
        }
      }
    }

    .paycode-card-container {
      background-color: #fff !important;
      border-top: 1px solid #f0f0f0;
      padding: 12px;
      box-sizing: content-box;
      margin-bottom: 16px;

      .discount-tags {
        display: flex !important;
        align-items: center;
        background: #f5f5f5 !important;
        padding: 12px 16px;
        margin-bottom: 16px;
        border-radius: 8px;
        height: 30px;
        line-height: 1em;
        color: #666;

        .discount-tag {
          font-size: 12px;
          font-weight: 500;
          flex: 1;
        }

        .divider {
          width: 2px;
          height: 20px;
          background: #d9d9d9;
          margin: 0 12px;
        }

        .balance-tag {
          color: #666;
          font-weight: 500;
          font-size: 12px;
          flex: 1;
          text-align: left;
        }
      }

      // 省钱账单区域
      .savings-section {
        border-radius: 12px;
        position: relative;
        padding: 16px;
        .savings-header {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: 12px;

          .savings-title {
            font-size: 14px;
            color: #000;
            line-height: 1em;
          }

          .view-bill-btn {
            background: #1890ff !important;
            color: white !important;
            border: none;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 500;
            padding: 4px 10px;
            cursor: pointer;
            display: flex !important;
            align-items: center;
            gap: 6px;
            transition: all 0.2s ease;

            .arrow {
              font-size: 12px;
              transition: transform 0.2s ease;
            }

            &:hover {
              background: #40a9ff;
              transform: translateY(-1px);
              box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);

              .arrow {
                transform: translateX(2px);
              }
            }

            &:active {
              transform: translateY(0);
              background: #096dd9;
            }
          }
        }

        .savings-amount {
          font-size: 16px;
          color: #000;
          margin-bottom: 8px;
          line-height: 1em;
          position: relative;
          z-index: 0;

          .amount {
            color: #ff4d4f;
            font-weight: bold;
            font-size: 18px;
            line-height: 1em;
          }
        }

        .savings-tip {
          height: 30px;
          color: #999;
          background-color: #f7f8fa;
          font-size: 13px;
          line-height: 30px;
          padding-left: 12px;
          border-radius: 5px;
        }
      }
    }
  }

  // 底部导航
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #f0f0f0;
    display: flex;
    padding: 8px 0;
    height: 78px;
    background: #ffffff;
    border-radius: 15px 15px 0px 0px;
    box-sizing: border-box;
    // 确保在iOS Safari中正确显示
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;

    .nav-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 8px;
      color: #999;

      &.active {
        color: #1890ff;

        .nav-icon {
          color: #1890ff;
        }
      }
      .nav-icon {
        margin-bottom: 4px;
      }

      span {
        font-size: 12px;
      }
    }
  }
}

// 彩虹动画关键帧
@keyframes rainbow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.pay-btn {
  width: 80% !important;
  margin: 0 auto;
  margin: 24px auto;
}

.pay-method {
  background: #fafafa;
  border-radius: 6px;
  padding:  24px 24px 12px 24px;
  margin: 0 18px;

  .pay-method-title {
    padding-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
  }

  .pay-method-item {
    display: flex;
    align-items: center;
    padding: 6px 0;
    cursor: pointer;
    .pay-method-icon {
      width: 24px;
      height: 24px;
      margin-right: 12px;
      border-radius: 4px;
    }
    .pay-method-text {
      flex: 1;
      font-size: 14px;
      color: #333;
    }

    .pay-method-radio {
      width: 20px;
      height: 20px;
      border: 2px solid #ddd;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      color: white;

      &.selected {
        border-color: #1890ff;
        background: #1890ff;
      }
    }
  }

  .pay-method-divider {
    height: 1px;
    width: 100%;
    background: #e8e8e8;
    margin: 8px 0;
  }

  .other-payment-methods {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
    cursor: pointer;
    color: #333;
    .arrow {
      margin-left: 8px;
      font-size: 12px;
      line-height: 1em;
      transition: transform 0.2s;
      &.up {
        transform: rotate(180deg);
      }
    }
  }

  .other-methods {
    border-top: 1px solid #e8e8e8;
    .pay-method-item {
      .pay-method-text {
        font-size: 14px;
      }
    }
  }
}

.discount-value {
  color: #52a2ff;
}

.adm-card {
  border-radius: 12px 12px 0px 0px;
}

.cn-card.cn-card-shadow {
  box-shadow: unset !important;
}

.pay-method-divider {
  height: 1px;
  width: 100%;
  background: #e8e8e8;
  margin: 0px 0 8px 0px;
}

.deduct-tip{
  font-size: 10px;
  line-height: 1em;
  color: grey;
}